package com.bw.http.utils

import com.blankj.utilcode.util.SPUtils
import com.bw.base.constants.ApiConst
import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor:Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request().newBuilder()
            .addHeader(ApiConst.PARAM_TOKEN, SPUtils.getInstance().getString(ApiConst.PARAM_TOKEN)).build()
        return chain.proceed(request)
    }
}